package com.fyh.feign.fallback;

import com.fyh.constant.MessageConstant;
import com.fyh.entity.common.Result;
import com.fyh.entity.job.DeliveryRecord;
import com.fyh.entity.job.JobPosition;
import com.fyh.entity.job.SimpleJobPosition;
import com.fyh.entity.user.SimpleCandidate;
import com.fyh.feign.EmployerJobFeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Component
public class EmployerJobFeignClientFallback implements EmployerJobFeignClient {

    @Override
    public Result<List<SimpleJobPosition>> getSimpleJobListByEmployerId(Long employerId) {
        System.out.println(MessageConstant.GET_JOB_LIST_FAILED);
        throw new RuntimeException(MessageConstant.GET_JOB_LIST_FAILED);
    }

    @Override
    public Result<List<String>> getTagNameListByPositionId(Long positionId) {
        System.out.println(MessageConstant.GET_TAG_LIST_FAILED);
        throw new RuntimeException(MessageConstant.GET_TAG_LIST_FAILED);
    }

    @Override
    public Result<JobPosition> getJobPositionDetail(Long positionId) {
        System.out.println(MessageConstant.GET_JOB_DETAIL_FAILED);
        throw new RuntimeException(MessageConstant.GET_JOB_DETAIL_FAILED);
    }

    @Override
    public Result updateJobPosition(JobPosition jobPosition) {
        System.out.println(MessageConstant.UPDATE_JOB_FAILED);
        throw new RuntimeException(MessageConstant.UPDATE_JOB_FAILED);
    }

    @Override
    public Result addJobPosition(JobPosition jobPosition) {
        System.out.println(MessageConstant.ADD_JOB_FAILED);
        throw new RuntimeException(MessageConstant.ADD_JOB_FAILED);
    }

    @Override
    public Result deleteJobPosition(Long positionId) {
        System.out.println(MessageConstant.DELETE_JOB_FAILED);
        throw new RuntimeException(MessageConstant.DELETE_JOB_FAILED);
    }

    @Override
    public Result updateJobStatus(Integer status, Long positionId) {
        System.out.println(MessageConstant.UPDATE_JOB_STATUS_FAILED);
        throw new RuntimeException(MessageConstant.UPDATE_JOB_STATUS_FAILED);
    }

    @Override
    public Result<List<DeliveryRecord>> getSimpleDeliveryRecordListList(Long positionId, String status) {
        System.out.println(MessageConstant.GET_SIMPLE_CANDIDATE_ID_LIST_FAILED);
        throw new RuntimeException(MessageConstant.GET_SIMPLE_CANDIDATE_ID_LIST_FAILED);
    }

    @Override
    public Result updateDeliveryStatus(DeliveryRecord deliveryRecord) {
        System.out.println(MessageConstant.UPDATE_DELIVERY_STATUS_FAILED);
        throw new RuntimeException(MessageConstant.UPDATE_DELIVERY_STATUS_FAILED);
    }

}
